package cn.green.core.adapt.config;

import cn.green.config.interfaces.QTableConfiguration;
import cn.green.core.components.ddao.QDcl;
import cn.green.core.components.ddao.QDdl;
import cn.green.core.components.ddao.QDml;
import cn.green.core.components.ddao.QDql;
import cn.green.core.components.entity.DatabaseSql;
import cn.green.mng.sql.QOrmDcl;
import cn.green.mng.sql.QOrmDdl;
import cn.green.mng.sql.QOrmDml;
import cn.green.mng.sql.QOrmDql;

import java.util.Collections;
import java.util.List;
import java.util.Map;


/**
 * @author wang.yishu
 * @version 1.0
 * @className QOrmTableConfiguration
 * @description TODO
 * @date 2025/5/15 15:20
 */
public class QOrmTableConfiguration implements QTableConfiguration {

    @Override
    public QDdl getQDdl() {
        return new QOrmDdl() {
            @Override
            public int executeDdlSql(DatabaseSql ddlSql) {
                return 0;
            }

            @Override
            public int crtTable(DatabaseSql crtTableSql) {
                return 0;
            }

            @Override
            public int delTable(DatabaseSql delTableSql) {
                return 0;
            }

            @Override
            public int addField(DatabaseSql addFieldSql) {
                return 0;
            }

            @Override
            public int updField(DatabaseSql updFieldSql) {
                return 0;
            }

            @Override
            public int delField(DatabaseSql delFieldSql) {
                return 0;
            }
        };
    }

    @Override
    public QDcl getQDcl() {
        return new QOrmDcl() {
            @Override
            public int execute(DatabaseSql sql) {
                return 0;
            }

            @Override
            public int existTable(DatabaseSql sql) {
                return 0;
            }

            @Override
            public int existField(DatabaseSql sql) {
                return 0;
            }
        };
    }

    @Override
    public QDml getQDml() {
        return new QOrmDml() {
            @Override
            public Object insert(DatabaseSql sql) {
                return null;
            }

            @Override
            public Object insertAndGetPrimary(DatabaseSql sql) {
                return null;
            }

            @Override
            public Object update(DatabaseSql sql) {
                return null;
            }

            @Override
            public Object delete(DatabaseSql sql) {
                return null;
            }
        };
    }

    @Override
    public QDql getQDql() {
        return new QOrmDql() {
            @Override
            public List<Map<String, Object>> selectList(DatabaseSql sql) {
                return Collections.emptyList();
            }

            @Override
            public Long selectCount(DatabaseSql sql) {
                return 0L;
            }

            @Override
            public Map<String, Object> selectOne(DatabaseSql sql) {
                return Collections.emptyMap();
            }
        };
    }
}
